import HttpUtil from '../utils/HttpUtil'

export function addScoreRecord(info) {
  return HttpUtil.post('/external/gameUser/v1/addScoreRecord', info).then((res) => {
    // const { userStore } = useStore()
    // if (res > userStore.userinfo.maxScore) {
    //   userStore.setUserinfo({ maxScore: info.score })
    // }
  })
}

export function getUserRankInfo() {
  return HttpUtil.get('/external/gameUser/v1/getUserRankInfo', {})
}

export function getByKey(param) {
  return HttpUtil.get('/external/commonConfig/v1/getByKey', param)
}

export function dailyShare(operateType) {
  return HttpUtil.get('/external/gameUser/v1/dailyShare', { operateType: operateType })
}
